// pages/new/new.js
Page({
  data: {
    bannerSrc: "/images/oder/1.jpg",
    coffeeArr: [
      "/images/oder/1.jpg",
      "/images/oder/2.jpg",
      "/images/oder/3.jpg",
      "/images/oder/4.jpg",
      "/images/oder/5.jpg",
      "/images/oder/6.jpg",
      "/images/oder/7.jpg",
      "/images/oder/8.jpg",
      "/images/oder/9.jpg"
    ],
    coffeeNum: 0,
    kouweiArr: ["原味", "加冰", "浓烈", "香甜", "加奶", "狂野"],
    kouweiNum: 0
  },
  chooseCoffee(e){
    let myIndex = e.currentTarget.dataset.myindex;
    this.setData({
      coffeeNum: myIndex,
      bannerSrc: this.data.coffeeArr[myIndex]
    })
  },
  chooseKouwei(e){
    let myIndex = e.currentTarget.dataset.myindex;
    this.setData({
      kouweiNum: myIndex
    })
  }
})